<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>复习</title>
  </head>
  <body></body>
  <script>
    var price = '23.22' ;
    var reg = new RegExp('\\d+\\.\\d+') ;
    console.log(reg + '')
    console.log(reg.test(price))

  </script>
</html>
